<!doctype html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>响应式原理-异步更新队列</title>
</head>
<body>
    <div id="example-1">
        <p>{{message}}</p>
    </div>

<script src="../lib/vue.js"></script>
<script>
    var exampleVm = new Vue({
        el : '#example-1',
        data : {
            message : 'welcome come in javascript world!'
        }
    })

    exampleVm.message = 'hello vue.js';
    /*
    * 直接使用exampoleVm.$el.textContent会获取到dom节点前后的空格，所以再
    * 调用一下trim()
    * */
    console.log(exampleVm.$el.textContent.trim() == 'hello vue.js');

    Vue.nextTick(function(){
        console.log(exampleVm.$el.textContent.trim() == 'hello vue.js');
    })
</script>
</body>
</html>